package com.itheima.wms.mapper;

import com.itheima.wms.pojo.WareHouse;
import com.itheima.wms.pojo.WareHousePageRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WareHouseMapper {

    public void addWareHouse(WareHouse wareHouse);

    public List<WareHouse> queryWareHouseOnCondation(@Param("start") Integer start, @Param("pageSize") Integer pageSize, @Param("wareHousePageRequest") WareHousePageRequest wareHousePageRequest);

    public Long queryWareHouseCount();

    public WareHouse queryWareHouseById(@Param("id") Integer id);

    public void updateWareHouse(@Param("wareHouse") WareHouse wareHouse);

    public void updateWareHouseOnlyStatus(@Param("wareHouse") WareHouse wareHouse);

    public void deleteWareHouse(@Param("id") Integer id);


    public List queryAllWareHousees();

//    public void updateAreaNum(Integer oldNum, Integer newNum);

    //减一
    public void minusIncludeNum(Long id);

    //加一
    public void plusIncludeNum(Long id);
}
